<?php
namespace app\admin\controller;
use think\Loader;
class Statistics extends Base{

    //订单统计
    public function order_chart(){
        $betime = date('Y');
        $this->assign('betime', $betime);
        $invoking = Loader::model('Other','service');
        $data     = $invoking->orderCount();
        $this->assign('count_n',$data['count_n']);
        $this->assign('count_y',$data['count_y']);
        return $this->fetch();
    }

    //用户统计
    public function user_chart(){
        $betime = date('Y');

        $invoking = Loader::model('Other','service');
        $data     = $invoking->userCount();
        $this->assign('count',$data);
        $this->assign('betime', $betime);
        return $this->fetch();
    }

    //咨询统计
    public function consul_chart(){
        $betime = date('Y');

        $invoking = Loader::model('Other','service');
        $data     = $invoking->consultCount();
        $this->assign('count',$data);
        $this->assign('betime', $betime);
        return $this->fetch();
    }
}
